package com.wit.witmg.mapper;

import com.wit.witmg.entity.TProdtask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bob
 * @since 2025-01-07
 */
public interface TProdtaskMapper extends BaseMapper<TProdtask> {

    @Update("update t_prodtask set inqt=inqt+#{inqt},stat=#{stat} where id=#{id}")
    boolean updateInqt(@Param("id") Integer id, @Param("inqt")Double inqt,@Param("stat") Integer stat);

    @Update("update t_prodtask set inqt=inqt+#{inqt},stat=5,edate=#{edate} where id=#{id}")
    boolean updateInqtEnd(@Param("id") Integer id, @Param("inqt")Double inqt,@Param("edate") Date edate);

    @Update("update t_prodtask set amount=amount+#{amount} where id=#{id}")
    boolean updateAmount(@Param("id") Integer id, @Param("amount")double amount);
}
